import 'package:flutter/services.dart';
import 'ToastUtils.dart';

const MethodChannel _kChannel =
    MethodChannel('com.qingning.qn/APKUpdataPlugin');

class ApkUpdataUtils {
  static install(String path) async {
    if (path == null || path.trim() == "") {
      ToastUtils.showToast("安装包路径不能为空");
    } else {
      Map<String, dynamic> map = Map();
      map["path"] = path;
      await _kChannel.invokeMethod('install', map);
    }
  }
}
